package com.test.springboot.springBootUtils;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;

import com.test.springboot.springBootUtils.conf.LogFilterAnnoaction;

@SpringBootApplication
@ServletComponentScan(basePackageClasses = LogFilterAnnoaction.class) // 开启注解的 过滤器扫描
@EnableJms // 启动消息队列
public class SpringBootUtilsApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringBootUtilsApplication.class, args);
	}

	@Bean
	public Redisson getRedisson() {
		// 单机模式
		Config config = new Config();
		config.useSingleServer().setAddress("redis://49.233.198.42:6381").setDatabase(0);
		return (Redisson) Redisson.create(config);
	}

}
